# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html

import scrapy


class CategoriesItem(scrapy.Item):
    # define the fields for your item here like:
    # name = scrapy.Field()
    name = scrapy.Field()   #分类名称
    url = scrapy.Field()    #分类链接
    id = scrapy.Field()     #分类id
    index = scrapy.Field()
class ProductsItem(scrapy.Item):
    name = scrapy.Field()  #商品名称
    url = scrapy.Field()   #商品url
    id = scrapy.Field()    #商品ID
    category = scrapy.Field() #商品分类
    reallyPrice = scrapy.Field() #商品价格
    originalPrice =scrapy.Field() #商品原价
    description = scrapy.Field() #商品描述
    shopID = scrapy.Field()#shop ID
    venderID = scrapy.Field() #卖家ID
    commentCount = scrapy.Field() #评论总数
    goodComment = scrapy.Field() #好评数
    generalComment = scrapy.Field() #中评数
    badComment = scrapy.Field()#差评数
    favourableDesc1 = scrapy.Field()  # 优惠描述1
    favourableDesc2 = scrapy.Field()  # 优惠描述2


class ShopItem(scrapy.Item):
    id = scrapy.Field() #店铺名称
    name = scrapy.Field() #店铺名称 别名
    url1 = scrapy.Field()
    url2 = scrapy.Field()
    shopID = scrapy.Field() #店铺ID
    venderID = scrapy.Field() #卖家ID


class CommentItem(scrapy.Item):
    id = scrapy.Field()  #评论id
    productId = scrapy.Field() #商品ID
    guid = scrapy.Field() #评论者id
    content =scrapy.Field() #评论内容
    creationTime = scrapy.Field()#评论时间
    isTop = scrapy.Field() #置顶
    referenceID = scrapy.Field()
    referenceName = scrapy.Field()
    referenceType = scrapy.Field()
    referenceTypeId = scrapy.Field()
    firstCategory = scrapy.Field()
    secondCategory = scrapy.Field()
    thirdCategory = scrapy.Field()
    replyCount = scrapy.Field() #回复次数
    score = scrapy.Field() #分数
    status= scrapy.Field()
    title = scrapy.Field()
    usefulVoteCount = scrapy.Field()#被标记的游泳评论数
    uselessVoteCount = scrapy.Field()
    userImage = scrapy.Field()
    userImageUrl = scrapy.Field()
    userLevelId = scrapy.Field()
    userProvince = scrapy.Field()
    viewCount = scrapy.Field()
    orderId = scrapy.Field()  #订单ID
    isReplyGrade = scrapy.Field()
    nickname = scrapy.Field() #评论人名称
    userClient = scrapy.Field()
    mergeOrderStatus = scrapy.Field()
    discussionID = scrapy.Field()
    productColor = scrapy.Field()
    productSize = scrapy.Field()
    imageCount = scrapy.Field() #评论中图片数量
    integral = scrapy.Field()
    userImgFlag = scrapy.Field()
    anonymousFlag = scrapy.Field()
    userLevelName = scrapy.Field()
    plusAvailable = scrapy.Field()
    recommend = scrapy.Field()
    userLevelColor = scrapy.Field()
    userClientShow = scrapy.Field()
    isMobile = scrapy.Field() #是否移动端评论
    days = scrapy.Field()
    afterDays = scrapy.Field() #追加评论

class CommentImageItem(scrapy.Item):
    _id =scrapy.Field()
    associateId =scrapy.Field()  #和CommentItem的discussionId相同
    productId =scrapy.Field()   #不是ProductsItem的id，这个值为0
    imgUrl =scrapy.Field()
    available =scrapy.Field()
    pin =scrapy.Field()
    dealt =scrapy.Field()
    imgTitle =scrapy.Field()
    isMain =scrapy.Field()


class CommentSummaryItem(scrapy.Item):
    id =scrapy.Field()
    goodRateShow =scrapy.Field()
    poorRateShow =scrapy.Field()
    poorCountStr =scrapy.Field()
    averageScore =scrapy.Field()
    generalCountStr =scrapy.Field()
    showCount =scrapy.Field()
    showCountStr =scrapy.Field()
    goodCount =scrapy.Field()
    generalRate =scrapy.Field()
    generalCount =scrapy.Field()
    skuId =scrapy.Field()
    goodCountStr =scrapy.Field()
    poorRate =scrapy.Field()
    afterCount =scrapy.Field()
    goodRateStyle =scrapy.Field()
    poorCount =scrapy.Field()
    skuIds =scrapy.Field()
    poorRateStyle =scrapy.Field()
    generalRateStyle =scrapy.Field()
    commentCountStr =scrapy.Field()
    commentCount =scrapy.Field()
    productId =scrapy.Field()  #同ProductsItem的id相同
    afterCountStr =scrapy.Field()
    goodRate =scrapy.Field()
    generalRateShow =scrapy.Field()
    jwotestProduct =scrapy.Field()
    maxPage =scrapy.Field()
    score =scrapy.Field()
    soType =scrapy.Field()
    imageListCount =scrapy.Field()


class HotCommentTagItem(scrapy.Item):
    id =scrapy.Field()
    name =scrapy.Field()
    status =scrapy.Field()
    rid =scrapy.Field()
    productId =scrapy.Field()
    count =scrapy.Field()
    created =scrapy.Field()
    modified =scrapy.Field()
    type =scrapy.Field()
    canBeFiltered =scrapy.Field()



